﻿using System;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Text;

namespace CSclass
{//这部分我就不删除了，留着做纪念
    class Text1
    {
        static void Exanchange(int x,int y)
        {
            int flag = x;
            flag = y;
            y = x;
            x = flag;
        }
        static void Main(string[] args)
        {
            int a = 2;
            int b = 5;
            Exanchange(a, b);
            Console.WriteLine("a=" + a.ToString() + "\r\n" + "b=" + b.ToString());
        }
    }
   static void TestRef(ref Ref r)//ref 的参数
    {
        r = new Ref()//实例化
        {
            X = -1
        };//给参数
    }
    static void TestOut(out Ref r)
    {
        r = new Ref()
        { 
            X=-11//还是实例化
        };
        //结束
    }
    static void Main(string[] args)
    {
        Var ref1 = new Ref()
        { 
           X=10
        };
        TestRef(Ref ,ref1);
        TextOut(out Ref ref2);
    }
}
